
Setup Google SMTP server: 

1. Create a google account if you do not already have one.  
2. Turn  2-step verification ON.  
  a. Go into google account < myaccount < security < Signing into Google.  
  b. Follow Google’s steps to set up 2-step verification.  
3. Create an app password. This will allow us to create a password for use when sending mail through R.  
  a. Go into google account < myaccount < security < Signing into Google. 
  b. Click on App Passwords. 
  c. Generate a new app password by clicking the dropdown next to Select App. Choose Other and name it SMTP then click generate.
  d. A window will pop up with your app password. Copy the 16 character password.  
4. For mailR SMTP settings, hostname will be “smtp.gmail.com”, port = 465, username = “yourgmailemail@gmail.com”,  password = “your.16character.app.password”. Set ssl = TRUE and authenticate = TRUE.  